<template>
  <div>
    <router-link to="/">home</router-link> ||
    <router-link to="/test">test</router-link>
    <br />
    <el-input v-model="message" placeholder="请输入内容" style="width: 150px" />
    <p>Message is: {{ message }}</p>
    <button v-on:click="greet">Greet</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      message: ""
    };
  },
  created: function() {},
  methods: {
    greet: function() {
      // console.log('route',this.$route)
      // console.log('router',this.$router)
      // console.log('router.options',this.$router.options)
      // console.log('router.options.routes',this.$router.options.routes)
      if (this.message == "") {
        return;
      } else {
        alert("alert=" + this.message);
      }
    }
  }
};
</script>
